<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
					  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:f="http://java.sun.com/jsf/core" 
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:ui="http://java.sun.com/jsf/facelets">
	  
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Patient Registration</title>
	<h:outputStylesheet name="view.css" library="css" />
	<h:outputScript name="view.js" library="js" />
    <h:outputScript name="calendar.js" library="js" />
</h:head>

<h:body id="main_body" >
	
	<h:graphicImage id="top" library="img" name="top.png"/>
	<div id="form_container">
	
		<h1><a>Patient Registration</a></h1>
		
		<ui:include src="menu_inc.xhtml" />
		
		<h:form id="form_743687" styleClass="appnitro" prependId="false">
		
			<div class="form_description">
				<h2>Patient Registration</h2>
				<p></p>
			</div>
									
			<ul >
				<li id="li_1" >
				
					<h:outputLabel styleClass="description" for="element_1">Name </h:outputLabel>
					<div>
						<h:inputText id="element_1" styleClass="element text medium" maxlength="255" value="#{patientC.name}" />
					</div> 
				</li>		
				
				<li id="li_2" >
				
					<h:outputLabel styleClass="description" for="element_2">Birthday </h:outputLabel>
					<span>
				 		<h:inputText id="element_2_3" name="birthday" styleClass="element text" size="10" maxlength="10" value="#{patientC.birthday}">
				 			<f:convertDateTime pattern="dd/MM/yyyy"/>
				 		</h:inputText>
						<h:outputLabel for="element_2_3">DD/MM/YYYY</h:outputLabel>
					</span>
						
					<span id="calendar_2">
						<h:graphicImage id="cal_img_2" styleClass="datepicker" library="img" name="calendar.gif" alt="Pick a date." />	
					</span>
					
					<script type="text/javascript">
						Calendar.setup({
							inputField	 : "element_2_3",
							baseField    : "element_2",
							displayArea  : "calendar_2",
							button		 : "cal_img_2",
							ifFormat	 : "%B %e, %Y",
							onSelect	 : selectDate
						});
					</script>
		 
				</li>		
				
				<li id="li_14" >
					<h:outputLabel styleClass="description" for="element_14">Gender </h:outputLabel>
					<h:panelGroup>
						<h:selectOneRadio id="subscriptions" value="#{patientC.gender}" styleClass="element radio">
						    <f:selectItem id="element_14_1" itemLabel="Male" itemValue="m" />
						    <f:selectItem id="element_14_2" itemLabel="Female" itemValue="f" />
						</h:selectOneRadio>		
					</h:panelGroup> 
				</li>		 
				
				<li id="li_16" >
					<h:outputLabel styleClass="description" for="element_16">Marital Status </h:outputLabel>
					<h:panelGroup layout="block">
						<h:selectOneMenu class="element select small" id="element_16" value="#{patientC.maritalId}">
							<f:selectItem itemLabel="(Select one item)"/>
							<f:selectItems value="#{patientC.maritalList}" var="m" itemLabel="#{m.description}" itemValue="#{m.id}"/>
						</h:selectOneMenu>					
					</h:panelGroup> 
				</li>		
				
				<li id="li_3" >
					<h:outputLabel styleClass="description" for="element_3">Occupation </h:outputLabel>
					<div>
						<h:inputText id="element_3" name="job" styleClass="element text medium" maxlength="255" value="#{patientC.job}"/> 
					</div> 
				</li>		
				
				<li id="li_4" >
					<h:outputLabel styleClass="description" for="element_4">Address 1 </h:outputLabel>
					<div>
						<h:inputText id="element_4" name="address1" styleClass="element text large" maxlength="255" value="#{patientC.address1}"/> 
					</div> 
				</li>		
				
				<li id="li_5" >
					<h:outputLabel styleClass="description" for="element_5">Address 2 </h:outputLabel>
					<div>
						<h:inputText id="element_5" name="address2" styleClass="element text large" maxlength="255" value="#{patientC.address2}"/> 
					</div> 
				</li>		
				
				<li id="li_6" >
					<h:outputLabel styleClass="description" for="element_6">Address 3 </h:outputLabel>
					<div>
						<h:inputText id="element_6" name="address3" styleClass="element text large" maxlength="255" value="#{patientC.address3}"/> 
					</div> 
				</li>		
				
				<li id="li_7" >
					<h:outputLabel styleClass="description" for="element_7">Zip Code </h:outputLabel>
					<div>
						<h:inputText id="element_7" name="zipCode" styleClass="element text medium" maxlength="255" value="#{patientC.zipCode}"/> 
					</div> 
				</li>		
				
				<!-- 
				<li id="li_16" >
					<h:outputLabel styleClass="description" for="element_16">State </h:outputLabel>
					<div>
						<select class="element select medium" id="element_16" name="element_16"> 
							<option value="" selected="selected"></option>
							<option value="1" >Acre</option>
							<option value="2" >Alagoas</option>
							<option value="3" >Amap&aacute;</option>
							<option value="4" >Bahia</option>
							<option value="5" >Cear&aacute;</option>
							<option value="6" >Distrito Federal</option>
							<option value="7" >Esp&iacute;rito Santo</option>
							<option value="8" >Goi&aacute;</option>
							<option value="9" >Maranh&atilde;o</option>
							<option value="10" >Mato Grosso</option>
							<option value="11" >Mato Grosso do Sul</option>
							<option value="12" >Minas Gerais</option>
							<option value="13" >Par&aacute;</option>
							<option value="14" >Para&iacute;ba</option>
							<option value="15" >Paran&aacute;</option>
							<option value="16" >Pernambuco</option>
							<option value="17" >Piau&iacute;</option>
							<option value="18" >Rio de Janeiro</option>
							<option value="19" >Rio Grande do Norte</option>
							<option value="20" >Rio Grande do Sul</option>
							<option value="21" >Rond&ocirc;nia</option>
							<option value="22" >Roraima</option>
							<option value="23" >Santa Catarina</option>
							<option value="24" >S&atilde;o Paulo</option>
							<option value="25" >Sergipe</option>
							<option value="26" >Tocantins</option>
				
						</select>
					</div> 
				</li>	
				 	
				
				<li id="li_8" >
					<h:outputLabel styleClass class="description" for="element_8">City </h:outputLabel>
					<div>
						<input id="element_8" name="element_8" class="element text medium" type="text" maxlength="255" value=""/> 
					</div> 
				</li>
				-->		
				
				<li id="li_9" >
					<h:outputLabel styleClass="description" for="element_9">Phone </h:outputLabel>
					<div>
						<h:inputText id="element_9_1" name="phone" styleClass="element text" size="15"  value="#{patientC.phone}" />
					</div>
				</li>		
				
				<li id="li_10" >
					<h:outputLabel styleClass="description" for="element_10">ID 1 </h:outputLabel>
					<div>
						<h:inputText id="element_10" name="id" styleClass="element text medium" maxlength="255" value="#{patientC.identification}" /> 
					</div> 
				</li>		
					
				<li id="li_11" >
					<h:outputLabel styleClass="description" for="element_11">ID 2 </h:outputLabel>
					<div>
						<h:inputText id="element_11" name="cpf" styleClass="element text medium" maxlength="255" value="#{patientC.cpf}" /> 
					</div> 
				</li>		
				
				<li id="li_12" >
					<h:outputLabel styleClass="description" for="element_12">E-mail </h:outputLabel>
					<div>
						<h:inputText id="element_12" name="email" styleClass="element text medium" maxlength="255" value="#{patientC.email}" /> 
					</div> 
				</li>		
				
				<li id="li_13" >
					<h:outputLabel styleClass="description" for="element_13">Notes </h:outputLabel>
					<div>
						<h:inputTextarea id="element_13" name="notes" styleClass="element textarea small" value="#{patientC.notes}" /> 
					</div> 
				</li>

				<li id="li_13" >
					<h:outputLabel styleClass="description" for="element_14">Username </h:outputLabel>
					<div>
						<h:inputText id="element_14" name="login" styleClass="element text medium" maxlength="255" value="#{patientC.username}" /> 
					</div> 
				</li>

				<li id="li_13" >
					<h:outputLabel styleClass="description" for="element_15">Password </h:outputLabel>
					<div>
						<h:inputSecret id="element_15" name="password" styleClass="element text medium" maxlength="255" value="#{patientC.password}" /> 
					</div> 
				</li>
			
				<li class="buttons">
					<h:commandButton styleClass="button_text" value="Submit" action="#{patientC.save()}" />
				</li>
			</ul>
		</h:form>	
		<div id="footer">
			<i>&copy;2013 All Rights Reserved.</i>
		</div>
	</div>
	
	<h:graphicImage id="bottom" library="img" name="bottom.png"/>
	
</h:body>

</html>